home *** CD-ROM | disk | FTP | other *** search
/ Clickx 75 / Clickx 75.iso / software / expressionweb / expressionwebv3 / ExpressionWeb_en.exe / Setup / WeLocen.cab / xWeb.FPEXPSAT.dll.en / HTML / 6858 next >
Encoding:
Extensible Markup Language  |  2009-07-15  |  5.5 KB  |  98 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <xsl:stylesheet version="1.0" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3.      <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
  4.      
  5.      <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="/">
  6.           <x:schema xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" targetNamespace="http://schemas.microsoft.com/sharepoint/dsp" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:x="http://www.w3.org/2001/XMLSchema">
  7.                <xsl:apply-templates />
  8.           </x:schema>
  9.      </xsl:template>
  10.      
  11.      <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:element">
  12.           <x:element>
  13.                <xsl:attribute name="name"><xsl:value-of select="@name"></xsl:value-of> </xsl:attribute>
  14.                <xsl:apply-templates />
  15.           </x:element>
  16.      </xsl:template>
  17.      
  18.      <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:complexType">
  19.           <x:complexType xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
  20.                <xsl:apply-templates />
  21.           </x:complexType>
  22.      </xsl:template>
  23.      
  24.      <xsl:template   xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:attribute" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp">
  25.           <x:attribute>     
  26.                <xsl:attribute name="name"><xsl:value-of select="@name"></xsl:value-of> </xsl:attribute>
  27.                <xsl:attribute name="use"><xsl:value-of select="@use"></xsl:value-of> </xsl:attribute>
  28.                
  29.                <xsl:variable name="rowname" select="concat('@',@name)"></xsl:variable>
  30.                <xsl:if test="//*/xs:unique[@msdata:PrimaryKey = 'true']/xs:field[@xpath = $rowname ] or (@name='ID' and @*[local-name()='filterSupport'])">
  31.                <xsl:attribute name="dsp:keyField">true</xsl:attribute></xsl:if>
  32.                <xsl:if test="//*/xs:unique[@msdata:ReadOnly = 'true']/xs:field[@xpath = $rowname ] or ((@name='Attachments' or @name='MetaInfo' or @name='ID') and @*[local-name()='filterSupport'])">
  33.                <xsl:attribute name="dsp:readOnly">true</xsl:attribute></xsl:if>
  34.  
  35.                <xsl:if test="@displayName"><xsl:attribute name="dsp:displayName"><xsl:value-of 
  36.                select="@displayName"/></xsl:attribute></xsl:if>
  37.                <xsl:if test="not(@displayName)"><xsl:attribute name="dsp:displayName"><xsl:value-of 
  38.                select="@name"/></xsl:attribute></xsl:if>
  39.                <xsl:for-each select="@*">
  40.                     <xsl:if test="not(local-name()='name') and not(local-name()='use') and not(local-name()='type') and
  41.                                   namespace-uri() = 'http://schemas.microsoft.com/sharepoint/dsp'">
  42.                         <xsl:variable name="dspName" select="concat('dsp:', local-name())"/>
  43.                         <xsl:attribute name="{$dspName}"><xsl:value-of select="."/></xsl:attribute>
  44.                     </xsl:if>
  45.                 </xsl:for-each>
  46.                <xsl:attribute name="type">
  47.                <xsl:choose>
  48.                     <xsl:when test="@type"><xsl:value-of select="concat('x:', substring-after(@type, ':'))"/></xsl:when>
  49.                     <xsl:otherwise><xsl:value-of 
  50.                         select="concat('x:', substring-after(xs:simpleType/xs:restriction/@base, ':'))"/></xsl:otherwise>
  51.                </xsl:choose>
  52.                </xsl:attribute>
  53.                <xsl:if test="@tableName"><xsl:attribute name="dsp:tableName"><xsl:value-of select="@tableName"/></xsl:attribute></xsl:if>
  54.                <xsl:if test="xs:simpleType/xs:restriction/xs:maxLength[@value='1073741823'] or contains(@type, 'Binary')">
  55.                  <xsl:attribute name="dsp:sortable">false</xsl:attribute>
  56.                </xsl:if>
  57.                <xsl:attribute name="dsp:filterSupport">
  58.                     <xsl:choose>
  59.                         <xsl:when test="@*[local-name()='filterSupport']">
  60.                             <xsl:value-of select="@*[local-name()='filterSupport']"/>
  61.                         </xsl:when>
  62.                         <xsl:otherwise>Eq;Neq;ViewOnly;</xsl:otherwise>
  63.                     </xsl:choose>
  64.                </xsl:attribute>               
  65.                <xsl:if test="local-name()='html'"><xsl:attribute name="dsp:html"><xsl:value-of select="@*[local-name()='html']"/></xsl:attribute></xsl:if>
  66.                <xsl:apply-templates />
  67.           </x:attribute>
  68.      </xsl:template>
  69.      
  70.      <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:choice">
  71.           <x:sequence>
  72.                <xsl:attribute name="maxOccurs"><xsl:value-of select="@maxOccurs"></xsl:value-of> </xsl:attribute>
  73.                 <xsl:apply-templates />
  74.           </x:sequence>
  75.      </xsl:template>
  76.      
  77.      <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:sequence">
  78.           <x:sequence>
  79.                <xsl:attribute name="maxOccurs"><xsl:value-of select="@maxOccurs"></xsl:value-of> </xsl:attribute>
  80.                 <xsl:apply-templates />
  81.           </x:sequence>
  82.      </xsl:template>
  83.  
  84.     <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:choice">
  85.           <x:sequence>
  86.                <xsl:attribute name="maxOccurs"><xsl:value-of select="@maxOccurs"></xsl:value-of> </xsl:attribute>
  87.                 <xsl:apply-templates />
  88.           </x:sequence>
  89.      </xsl:template>
  90.  
  91.     <xsl:template xmlns:x="http://www.w3.org/2001/XMLSchema" match="xs:simpleType | xs:restriction | xs:enumeration">
  92.         <xsl:copy>
  93.             <xsl:copy-of select="@*"/>
  94.             <xsl:apply-templates />
  95.         </xsl:copy>
  96.     </xsl:template>
  97. </xsl:stylesheet>
  98.